Field of the Invention
The present invention relates to a communication apparatus and a method of controlling the same.
Description of the Related Art
It is crucial to specify a distance between information processing apparatuses (e.g., between an image forming apparatus and a mobile terminal). This is because various services (functions) can be provided between the apparatuses in accordance with the specified distance. For example, the mobile terminal may automatically execute processing for logging in the image forming apparatus upon detecting a decrease in the distance, that is, detecting that a user holding the mobile terminal has approached the image forming apparatus. This can save the user the trouble of performing a login operation. Conversely, the mobile terminal may automatically log out of the image forming apparatus if the distance between itself and the image forming apparatus increases, that is, if the user holding the mobile terminal moves away from the image forming apparatus. The image forming apparatus can be made inoperable if the user who logged in moves away from the image forming apparatus by a predetermined distance.
In this case, if the information processing apparatus has a wireless communication function, the distance can be specified by measuring the radio field intensities of radio waves of wireless communication. For example, assume a case in which the mobile terminal supports Bluetooth Low Energy (BLE) and receives BLE radio waves emitted by the image forming apparatus. The radio field intensities of wireless radio waves become higher when the distance is short, and lower when the distance is long, therefore, the distance can be accurately specified to some extent by measuring the radio field intensities. For example, Japanese Patent Laid-Open No. 2015-200989 describes technology for receiving, on a mobile terminal, wireless radio waves output from a plurality of wireless radio wave emission sources, and starting communication with the closest image forming apparatus based on the radio field intensities of the received radio waves.
However, the location and orientation of a BLE chip that emits radio waves may vary among different types of image forming apparatuses. In this case, even if the image forming apparatuses are distanced from a mobile terminal by the same distance and emit radio waves of the same radio field intensity, the mobile terminal may receive radio waves having different radio field intensities. This gives rise to the problem that accurate distances between the image forming apparatuses and the mobile terminal cannot be specified using the radio field intensities of wireless radio waves alone.